package com.dsdl.chatapp.common.utils.socket;

/**
 * Created by zzg on 2016/8/3.
 * 枚举型消息类型
 */
public enum MessageType {
    CONNECT, CONNECT_TIME_OUT, DISCONNECTED, RECEIVE_RESPONSE, SENDING_BEGIN, SENDING_CANCEL, SENDING_END;
    public static MessageType typeFromWhat(int what) {
        return MessageType.values()[what];
    }

    public int what() {
        return this.ordinal();
    }
}
